/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.applicatioN.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Slim
 */
@Embeddable
public class CertificationPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ORGANISME")
    private String organisme;
    @Basic(optional = false)
    @Column(name = "DOMAINE_D_EXPERTISE")
    private String domaineDExpertise;

    public CertificationPK() {
    }

    public CertificationPK(String organisme, String domaineDExpertise) {
        this.organisme = organisme;
        this.domaineDExpertise = domaineDExpertise;
    }

    public String getOrganisme() {
        return organisme;
    }

    public void setOrganisme(String organisme) {
        this.organisme = organisme;
    }

    public String getDomaineDExpertise() {
        return domaineDExpertise;
    }

    public void setDomaineDExpertise(String domaineDExpertise) {
        this.domaineDExpertise = domaineDExpertise;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (organisme != null ? organisme.hashCode() : 0);
        hash += (domaineDExpertise != null ? domaineDExpertise.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CertificationPK)) {
            return false;
        }
        CertificationPK other = (CertificationPK) object;
        if ((this.organisme == null && other.organisme != null) || (this.organisme != null && !this.organisme.equals(other.organisme))) {
            return false;
        }
        if ((this.domaineDExpertise == null && other.domaineDExpertise != null) || (this.domaineDExpertise != null && !this.domaineDExpertise.equals(other.domaineDExpertise))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.applicatioN.entities.CertificationPK[ organisme=" + organisme + ", domaineDExpertise=" + domaineDExpertise + " ]";
    }
    
}
